package com.enn.demo.biz.service.impl.application.command;

import com.enn.demo.core.service.impl.util.validator.group.AddGroup;
import com.enn.demo.core.service.impl.util.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用户Command
 *
 * @author haoxin
 * @date 2021-02-20
 **/
@Data
@ApiModel(value="用户",description="用户")
public class PersonCommand {

    /**
     * id
     */
    @ApiModelProperty(value = "用户id")
    @NotNull(message="用户id不能为空" , groups = UpdateGroup.class)
    private String id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    @NotBlank(message="用户名不能为空" , groups = AddGroup.class)
    private String userName;

    /**
     * 年龄
     */
    @ApiModelProperty(value = "年龄")
    @NotNull(message="年龄不能为空" , groups = AddGroup.class)
    private Integer age;

    /**
     * 生日
     */
    @ApiModelProperty(value = "生日")
    private String birthday;

}
